// 引入
import { createRouter, createWebHistory } from 'vue-router'

//引入组件
import About from '@/components/About.vue'
import Home from '@/components/Home.vue'
import News from '@/components/News.vue'


// 创建路由器
const router = createRouter({
  history: createWebHistory(), // 路由器的规则模式
  routes: [ // 管理路由 对应的关系 key value
    {
      path: '/home',
      component: Home
    },
    {
      path: '/news',
      component: News
    },
    {
      path: '/about',
      component: About
    }
  ]
})

export default router